<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
		/*	  window.onload=function(){
			  	var a=document.getElementsByTagName("li")
			  	
			  	//console.log(a.length); 0
			  for (var i=0;i<a.length;i++) {
			  	//console.log(a[i]);
			  	if(a[i] typeof HTMLLIElement){
			  		a[i].PannerNode.removeNode(a[i]);
			  	}
			  }   
			  console.log(a.length)
			  }*/
			   var testStr="sssss            aaaaa";
			      var result=testStr.replace(/\ +/g,"");//去掉空格
			      console.log(result);
		</script>
	</head> 
	<body> 
		<body>   
			 <p>你喜欢那个城市</p>
		<ul id="city">
			<li id="bj" name="beijing">北京</li>
			<li id="sh">上海</li>
			<li id="sz">苏州</li>
			<li>泉州</li>
		</ul>
		
		<br><br>
		<p>你喜欢那个游戏</p>
		<ul id="game">
			<li id="gm" >红警</li>
			<li>魔兽</li>
			<li>侠盗猎车</li>
			<li>罪恶都市</li>
		</ul>
		<button id="" onclick="c();"></button>
	</body>
	</body>
</html>
